<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>找回密码</title>
    <meta content="yes" name="apple-mobile-web-app-capable"><!-- 这meta的作用就是删除默认的苹果工具栏和菜单栏允许全屏模式浏览-->
    <meta name="apple-touch-fullscreen" content="yes"><!-- 开启对web app程序的支持  -->
    <meta content="telephone=no,email=no" name="format-detection"><!-- iPhone会自动把你这个文字加链接样式、并且点击这个数字还会自动拨号！telephone=no就忽略页面中的数字识别为电话号码 ,email=no 忽略识别邮箱 -->
    <!--base css-->
    <link rel="stylesheet" href="CSS/reset.css"/>
    <link rel="stylesheet" href="CSS/index.css"/>
    <link rel="stylesheet" href="FONT/iconfont.css"/>
    <!--base css end-->
    <!--base js-->
    <!--<meta content="yes" name="apple-mobile-web-app-capable">-->
    <script>
        window.scrollTo(0, 0);
    </script>
    <!--<meta content="yes" name="apple-mobile-web-app-capable"> end-->
    <script src="JS/reset.js"></script>
    <script src="JS/jquery.min.js"></script>
    <script src="JS/zepto.min.js"></script>
    <script src="JS/TouchSlide.js"></script>
    <script src="JS/notice.js"></script>
    <script src="JS/screen.js"></script>
    <script src="JS/back.js"></script>
    <!--base js end-->
    <!--no base js-->
    <script src="JS/kuaisudenglu.js"></script>
    <!--no base js end-->


</head>
<body>
<!--wapper-->
<div class="wapper">
    <!--header-->
    <div class="header">
        <div class="header-list bag-1462c4">
            <div class="p-l-25 p-r-25 relative text-center f33">
                <a href="javascript:history.go(-1)" class="block"><i class="icon iconfont f-b">&#xe643;</i></a>
                <a href="{:U('Index/index')}" class="home"><i class="icon iconfont">&#xe61a;</i></a>
                <a href="javascript:;" class="text-fff">找回密码</a>
            </div>
        </div>
    </div>
    <!--header end-->
    <!--content-->
      <div class="content">
        <style>
        .error{
         border:1px solid red;
        }
        </style>
    <form action="{:U('Index/forget')}" method="post" class="dengluform">
            <div class="zhuce-list p-l-25 p-r-25">
                <div class="denglu">
                    <div class="dengluinput m-t-33 m-b-33">
                            <div class="denglutit relative msg">
                                <input type="text" name="phone" value="" placeholder="手机号" style="width: 67%" class="dlphone"/>
                                <a href="javascript:;" class="huqu">获取验证码</a>
                            </div>
                            <div class="denglutit">
                                <input type="text" id="get_yan" value="" placeholder="请输入验证码"/>
                            </div>
                            <div class="denglutit">
                                <input type="text" name="pwd" placeholder="请输入新的登录密码（6-16位数字/字母）"/>
                            </div> 
                    </div>
                    <div class="dlu">
                    <a href="#" class="denglusub" style="background:#ccc">立即修改</a>
                    </div>
                </div>
            </div>
    </form>
    <input type="hidden" value="" class="f_yzm">
       <script>
        $(document).ready(function(){
              $(".huqu").click(function(){
                var value=$(".huqu").text();
                var telphone=$('.dlphone').val();
                //获取手机号，判断是否有此号码，有，则返回一个值1，否，返回2
                if(value == "获取验证码" && telphone !=""){
                     $.post("{:U('Index/f_info')}",{phone:telphone},function(data){
                                if(data == 1){
                                   $('.msg').addClass('error');  
                                }else{
                                    $('.f_yzm').val(data);
                                }
                        });                    
                  }                                   
               });  
            //时时验证
            $('#get_yan').bind('input propertychange', function() {
              var get_yan = $('#get_yan').val();
            var cd=$('#get_yan').val().length;
            if(cd ==6){              
            //对比验证码，将输入的验证码发到后台验证
            $.post("{:U('Index/check_f_info')}",{type:15,yzm:get_yan},function(data){ 

                if(data == 1){
                     $(".dlu").html('<input type="submit" class="denglusub sub" vlaue="立即修改">')
                }else{
                    $(".dlu").html('<a href="#" class="denglusub" style="background:#ccc">立即修改</a>')
                }                
                      }); 
                          }
                          //满4位才验证
                }); 
         });
    </script>

        <!--content end-->



    </div>
    <!--wapper end-->
</div>
</body>
</html>